package com.atguigu.boot.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    /**
     * 静态资源规则和定制化
     * 1.默认的静态资源目录类路径下的/static (or /public or /resources or /META-INF/resources)
     * 2.原理：资源映射 /**
     * 请求要先去controller匹配没有再去找静态资源
     * 3.改变静态资源的访问路径
     *
     * 4.静态资源访问前缀
     *
     * 5.Webjars content
     *
     * 欢迎页：把页面放到静态资源路径下
     *
     * 自定义Favicon：favicon.ico放到静态资源路径下
     *
     * 注意配置自定义静态资源前缀和路径都有影响
     * @return
     */
    @RequestMapping("/logo.png")
    public String hello(){
        return "aaa";
    }

    @RequestMapping(value = "/user",method = RequestMethod.GET)
    public String get(){
        return "get请求";
    }
    @RequestMapping(value = "/user",method = RequestMethod.POST)
    public String post(){
        return "post请求";
    }
    @RequestMapping(value = "/user",method = RequestMethod.DELETE)
    public String delete(){
        return "delete请求";
    }
    @RequestMapping(value = "/user",method = RequestMethod.PUT)
    public String put(){
        return "put请求";
    }





}
